With very uninventive names. Names now, good names later.
https://bugzilla.gnome.org/show_bug.cgi?id=727983
},
_ensureUserListLoaded: function() {
- if (!this._userManager.is_loaded)
+ if (!this._userManager.is_loaded) {
this._userManagerLoadedId = this._userManager.connect('notify::is-loaded',
Lang.bind(this, function() {
if (this._userManager.is_loaded) {
this._userManagerLoadedId = 0;
}
}));
- else
- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList));
+ } else {
+ let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] _loadUserList');
+ }
},
_updateDisableUserList: function() {
},
onUpdateScope: this,
onComplete: function() {
- Mainloop.idle_add(Lang.bind(this, function() {
+ let id = Mainloop.idle_add(Lang.bind(this, function() {
this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._greeter.call_start_session_when_ready_sync');
},
onCompleteScope: this });
},
hold.release();
return GLib.SOURCE_REMOVE;
});
+ GLib.Source.set_name_by_id(this._timedLoginIdleTimeOutId, '[gnome-shell] this._timedLoginAnimationTime');
return hold;
},
this._queueMessageTimeout();
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._messageQueueTimeoutId, '[gnome-shell] this._queueMessageTimeout');
},
_queueMessage: function(message, messageType) {
this._thumbnailTimeoutId = Mainloop.timeout_add (
THUMBNAIL_POPUP_TIME,
Lang.bind(this, this._timeoutPopupThumbnails));
+ GLib.Source.set_name_by_id(this._thumbnailTimeoutId, '[gnome-shell] this._timeoutPopupThumbnails');
}
},
this._mouseTimeOutId = 0;
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._mouseTimeOutId, '[gnome-shell] this._enterItem');
} else
this._itemEntered(index);
},
this._showFrame(0);
this._timeoutId = Mainloop.timeout_add(this._speed, Lang.bind(this, this._update));
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._update');
}
this._isPlaying = true;
this.popupMenu();
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._menuTimeoutId, '[gnome-shell] this.popupMenu');
} else if (button == 3) {
this.popupMenu();
return Clutter.EVENT_STOP;
if (this._animationFilename == params.filename) {
if (params.onLoaded) {
- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
+ let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
params.onLoaded(this._animation);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] params.onLoaded');
}
}
this._animation = animation;
if (params.onLoaded) {
- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
+ let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
params.onLoaded(this._animation);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] params.onLoaded');
}
}));
}
this.isLoaded = true;
- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
+ let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
this.emit('loaded');
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this.emit');
},
_loadPattern: function() {
this._updateAnimation();
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._updateAnimationTimeoutId, '[gnome-shell] this._updateAnimation');
},
_loadAnimation: function(filename) {
this._driveEjectButtonId = this._volumeMonitor.connect('drive-eject-button', Lang.bind(this, this._onDriveEjectButton));
this._mountAllId = Mainloop.idle_add(Lang.bind(this, this._startupMountAll));
+ GLib.Source.set_name_by_id(this._mountAllId, '[gnome-shell] this._startupMountAll');
},
disable: function() {
},
_allowAutorunExpire: function(volume) {
- Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, function() {
+ let id = Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, function() {
volume.allowAutorun = false;
return GLib.SOURCE_REMOVE;
});
+ GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
}
});
const Component = AutomountManager;
Mainloop.source_remove(this._notifyTimeoutId);
this._notifyTimeoutId = Mainloop.timeout_add(500,
Lang.bind(this, this._notifyTimeout));
+ GLib.Source.set_name_by_id(this._notifyTimeoutId, '[gnome-shell] this._notifyTimeout');
},
_notifyTimeout: function() {
realMessage: group != 'meta' });
if (!props.noTimestamp) {
- if (timestamp < currentTime - SCROLLBACK_IMMEDIATE_TIME)
+ if (timestamp < currentTime - SCROLLBACK_IMMEDIATE_TIME) {
this.appendTimestamp();
- else
+ } else {
// Schedule a new timestamp in SCROLLBACK_IMMEDIATE_TIME
// from the timestamp of the message.
this._timestampTimeoutId = Mainloop.timeout_add_seconds(
SCROLLBACK_IMMEDIATE_TIME - (currentTime - timestamp),
Lang.bind(this, this.appendTimestamp));
+ GLib.Source.set_name_by_id(this._timestampTimeoutId, '[gnome-shell] this.appendTimestamp');
+ }
}
this._filterMessages();
this._composingTimeoutId = Mainloop.timeout_add_seconds(
COMPOSING_STOP_TIMEOUT,
Lang.bind(this, this._composingStopTimeout));
+ GLib.Source.set_name_by_id(this._composingTimeoutId, '[gnome-shell] this._composingStopTimeout');
} else {
this.source.setChatState(Tp.ChannelChatState.ACTIVE);
}
this._showLabelTimeoutId = 0;
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._showLabelTimeoutId, '[gnome-shell] item.showLabel');
if (this._resetHoverTimeoutId > 0) {
Mainloop.source_remove(this._resetHoverTimeoutId);
this._resetHoverTimeoutId = 0;
this._resetHoverTimeoutId = 0;
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._resetHoverTimeoutId, '[gnome-shell] this._labelShowing');
}
}
},
this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT,
Lang.bind(this, this._updateDragHover));
+ GLib.Source.set_name_by_id(this._updateHoverId, '[gnome-shell] this._updateDragHover');
},
_updateDragPosition : function (event) {
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._timerId, '[gnome-shell] this._confirm');
},
_stopTimer: function() {
return;
}
- if (!this._showIdleId)
- this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE,
- Lang.bind(this, function() {
- this.Show(time);
- return GLib.SOURCE_REMOVE;
- }));
+ if (!this._showIdleId) {
+ this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE,
+ Lang.bind(this, function() {
+ this.Show(time);
+ return GLib.SOURCE_REMOVE;
+ }));
+ GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.Show');
+ }
},
_createLayersForGroup: function (gname) {
this._show(monitor);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._keyboardRestingId, '[gnome-shell] this._clearKeyboardRestTimer');
},
_show: function(monitor) {
this._hide();
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._keyboardRestingId, '[gnome-shell] this._clearKeyboardRestTimer');
},
_hide: function() {
// until the event loop is uncontended and idle.
// This helps to prevent us from running the animation
// when the system is bogged down
- GLib.idle_add(GLib.PRIORITY_LOW, Lang.bind(this, function() {
+ let id = GLib.idle_add(GLib.PRIORITY_LOW, Lang.bind(this, function() {
this._startupAnimation();
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._startupAnimation');
},
_startupAnimation: function() {
Mainloop.source_remove(this._timeoutId);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'gnome-fs-trash-full\'');
return Clutter.EVENT_PROPAGATE;
}));
_deferredTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
+ GLib.Source.set_name_by_id(_deferredTimeoutId, '[gnome-shell] _runAllDeferredWork');
}
}
this._trayDwellTimeoutId = Mainloop.timeout_add(TRAY_DWELL_TIME,
Lang.bind(this, this._trayDwellTimeout));
+ GLib.Source.set_name_by_id(this._trayDwellTimeoutId, '[gnome-shell] this._trayDwellTimeout');
}
this._trayDwelling = true;
} else {
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT * 1000 : HIDE_TIMEOUT * 1000;
this._notificationLeftTimeoutId = Mainloop.timeout_add(timeout, Lang.bind(this, this._onNotificationLeftTimeout));
+ GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
}
},
this._notificationLeftMouseX = -1;
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
Lang.bind(this, this._onNotificationLeftTimeout));
+ GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
} else {
this._notificationLeftTimeoutId = 0;
this._useLongerNotificationLeftTimeout = false;
Mainloop.source_remove(this._notificationTimeoutId);
this._notificationTimeoutId = 0;
}
- if (timeout > 0)
+ if (timeout > 0) {
this._notificationTimeoutId =
Mainloop.timeout_add(timeout,
Lang.bind(this, this._notificationTimeout));
+ GLib.Source.set_name_by_id(this._notificationTimeoutId, '[gnome-shell] this._notificationTimeout');
+ }
},
_notificationTimeout: function() {
// Ignore replacesId since we already sent back a
// NotificationClosed for that id.
id = this._nextNotificationId++;
- Mainloop.idle_add(Lang.bind(this,
- function () {
- this._emitNotificationClosed(id, NotificationClosedReason.DISMISSED);
- return GLib.SOURCE_REMOVE;
- }));
+ let idle_id = Mainloop.idle_add(Lang.bind(this,
+ function () {
+ this._emitNotificationClosed(id, NotificationClosedReason.DISMISSED);
+ return GLib.SOURCE_REMOVE;
+ }));
+ GLib.Source.set_name_by_id(idle_id, '[gnome-shell] this._emitNotificationClosed');
return invocation.return_value(GLib.Variant.new('(u)', [id]));
}
Mainloop.source_remove(this._hideTimeoutId);
this._hideTimeoutId = Mainloop.timeout_add(HIDE_TIMEOUT,
Lang.bind(this, this._hide));
+ GLib.Source.set_name_by_id(this._hideTimeoutId, '[gnome-shell] this._hide');
},
cancel: function() {
this._lastHoveredWindow = null;
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._windowSwitchTimeoutId, '[gnome-shell] Main.activateWindow');
}
return DND.DragMotionResult.CONTINUE;
Mainloop.source_remove(this._xdndTimeOut);
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT,
Lang.bind(this, this._xdndToggleOverview, actor));
+ GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview');
return DND.DragMotionResult.CONTINUE;
},
this._timeoutId = Mainloop.timeout_add(minInterval,
Lang.bind(this, this._onTimeout));
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
},
_onTimeout: function() {
this.lock(false);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._lockTimeoutId, '[gnome-shell] this.lock');
}
this._activateFade(this._longLightbox, STANDARD_FADE_TIME);
if (!this._arrowAnimationId) {
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
+ GLib.Source.set_name_by_id(this._arrowAnimationId, '[gnome-shell] this._animateArrows');
this._animateArrows();
}
if (params.fadeToBlack && params.animateFade) {
// Take a beat
- Mainloop.timeout_add(1000 * MANUAL_FADE_TIME, Lang.bind(this, function() {
+ let id = Mainloop.timeout_add(1000 * MANUAL_FADE_TIME, Lang.bind(this, function() {
this._activateFade(this._shortLightbox, MANUAL_FADE_TIME);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._activateFade');
} else {
if (params.fadeToBlack)
this._activateFade(this._shortLightbox, 0);
function sleep(milliseconds) {
let cb;
- Mainloop.timeout_add(milliseconds, function() {
+ let id = Mainloop.timeout_add(milliseconds, function() {
if (cb)
cb();
return GLib.SOURCE_REMOVE;
});
+ GLib.Source.set_name_by_id(id, '[gnome-shell] sleep');
return function(callback) {
cb = callback;
function listModes() {
_loadModes();
- Mainloop.idle_add(function() {
+ let id = Mainloop.idle_add(function() {
let names = Object.getOwnPropertyNames(_modes);
for (let i = 0; i < names.length; i++)
if (_modes[names[i]].isPrimary)
print(names[i]);
Mainloop.quit('listModes');
});
+ GLib.Source.set_name_by_id(id, '[gnome-shell] listModes');
Mainloop.run('listModes');
}
return;
this._syncMenuVisbilityIdle = Mainloop.idle_add(Lang.bind(this, this._syncMenuVisibility));
+ GLib.Source.set_name_by_id(this._syncMenuVisbilityIdle, '[gnome-shell] this._syncMenuVisibility');
},
_buildItemExtended: function(string, initial_value, writable, on_set) {
this._initialDelayTimeoutId = 0;
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(this._initialDelayTimeoutId, '[gnome-shell] Main.osdWindow.cancel');
return true;
},
Mainloop.source_remove(this._motionTimeoutId);
this._motionTimeoutId = Mainloop.timeout_add(DISABLE_HOVER_TIMEOUT, Lang.bind(this, this._mouseTimedOut));
+ GLib.Source.set_name_by_id(this._motionTimeoutId, '[gnome-shell] this._mouseTimedOut');
},
_mouseTimedOut: function() {
this._iconClickedId = this._entry.connect('secondary-icon-clicked',
Lang.bind(this, this.reset));
- if (this._searchTimeoutId == 0)
+ if (this._searchTimeoutId == 0) {
this._searchTimeoutId = Mainloop.timeout_add(150,
Lang.bind(this, this._doSearch));
+ GLib.Source.set_name_by_id(this._searchTimeoutId, '[gnome-shell] this._doSearch');
+ }
} else {
if (this._iconClickedId > 0) {
this._entry.disconnect(this._iconClickedId);
{ expand: false, x_fill: false, x_align: St.Align.END });
this._timeoutId = Mainloop.timeout_add(ONE_SECOND, Lang.bind(this, this._tick));
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._tick');
},
close: function(timestamp) {
this._queueCheckWorkspaces();
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(workspace._keepAliveId, '[gnome-shell] this._queueCheckWorkspaces');
},
_windowRemoved: function(workspace, window) {
workspace._lastRemovedWindow = window;
this._queueCheckWorkspaces();
- Mainloop.timeout_add(LAST_WINDOW_GRACE_TIME, Lang.bind(this, function() {
+ let id = Mainloop.timeout_add(LAST_WINDOW_GRACE_TIME, Lang.bind(this, function() {
if (workspace._lastRemovedWindow == window) {
workspace._lastRemovedWindow = null;
this._queueCheckWorkspaces();
}
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._queueCheckWorkspaces');
},
_windowLeftMonitor: function(metaScreen, monitorIndex, metaWin) {
// use an idle handler to avoid mapping problems -
// see comment in Workspace._windowAdded
- Mainloop.idle_add(Lang.bind(this,
- function() {
- this._windowClone.emit('selected');
- return GLib.SOURCE_REMOVE;
- }));
+ let id = Mainloop.idle_add(Lang.bind(this,
+ function() {
+ this._windowClone.emit('selected');
+ return GLib.SOURCE_REMOVE;
+ }));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._windowClone.emit');
}
},
},
_onLeave: function() {
- if (this._idleToggleCloseId == 0)
+ if (this._idleToggleCloseId == 0) {
this._idleToggleCloseId = Mainloop.timeout_add(750, Lang.bind(this, this._idleToggleCloseButton));
+ GLib.Source.set_name_by_id(this._idleToggleCloseId, '[gnome-shell] this._idleToggleCloseButton');
+ }
return Clutter.EVENT_PROPAGATE;
},
this._currentLayout = null;
this._repositionWindowsId = Mainloop.timeout_add(750,
Lang.bind(this, this._delayedWindowRepositioning));
+ GLib.Source.set_name_by_id(this._repositionWindowsId, '[gnome-shell] this._delayedWindowRepositioning');
},
_doAddWindow : function(metaWin) {
if (!win) {
// Newly-created windows are added to a workspace before
// the compositor finds out about them...
- Mainloop.idle_add(Lang.bind(this,
- function () {
- if (this.actor &&
- metaWin.get_compositor_private() &&
- metaWin.get_workspace() == this.metaWorkspace)
- this._doAddWindow(metaWin);
- return GLib.SOURCE_REMOVE;
- }));
+ let id = Mainloop.idle_add(Lang.bind(this,
+ function () {
+ if (this.actor &&
+ metaWin.get_compositor_private() &&
+ metaWin.get_workspace() == this.metaWorkspace)
+ this._doAddWindow(metaWin);
+ return GLib.SOURCE_REMOVE;
+ }));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._doAddWindow');
return;
}
this._globalSignals.push(global.screen.connect('workspace-removed', Lang.bind(this, this._redisplay)));
this._timeoutId = Mainloop.timeout_add(DISPLAY_TIMEOUT, Lang.bind(this, this._onTimeout));
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
},
_getPreferredHeight : function (actor, forWidth, alloc) {
if (this._timeoutId != 0)
Mainloop.source_remove(this._timeoutId);
this._timeoutId = Mainloop.timeout_add(DISPLAY_TIMEOUT, Lang.bind(this, this._onTimeout));
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
this._show();
},
if (!win) {
// Newly-created windows are added to a workspace before
// the compositor finds out about them...
- Mainloop.idle_add(Lang.bind(this,
- function () {
+ let id = Mainloop.idle_add(Lang.bind(this,
+ function () {
if (!this._removed &&
metaWin.get_compositor_private() &&
metaWin.get_workspace() == this.metaWorkspace)
this._doAddWindow(metaWin);
return GLib.SOURCE_REMOVE;
}));
+ GLib.Source.set_name_by_id(id, '[gnome-shell] this._doAddWindow');
return;
}